package com.codeoss.framework.view.parser;

import org.springframework.stereotype.Service;

import com.codeoss.framework.view.component.Component;
import com.codeoss.framework.view.component.GroupTitle;
import com.fasterxml.jackson.databind.node.ObjectNode;

@Service("grouptitleParser")
public class GroupTitleParser extends AbstractComponentParser {
	protected void setAttributes(IParseContext parseContext, ObjectNode objectNode,Component component) {
		super.setAttributes(parseContext, objectNode, component);
		GroupTitle groupTitle=(GroupTitle)component;
		String title=objectNode.get("title").asText();
		groupTitle.setTitle(title);
	}
	
	@Override
	protected Component createComponent(IParseContext parseContext, ObjectNode objectNode) {
		// TODO Auto-generated method stub
		return new GroupTitle();
	}

}
